﻿CREATE TABLE [dbo].[Order_PaymentRecord] (
    [Id]              INT              IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL,
    [GId]             UNIQUEIDENTIFIER CONSTRAINT [DF_Order_PaymentRecord_GId] DEFAULT (newid()) ROWGUIDCOL NULL,
    [RId]             INT              NULL,
    [OId]             UNIQUEIDENTIFIER NULL,
    [CusId]           UNIQUEIDENTIFIER NULL,
    [CusName]         NVARCHAR (200)   NULL,
    [SalesmanAccount] NVARCHAR (50)    NULL,
    [Salesman]        NVARCHAR (50)    NULL,
    [CreateDate]      DATETIME         NULL,
    [Prices]          DECIMAL (18, 2)  NULL,
    [PaymentTypeId]   INT              NULL,
    [PaymentType]     NVARCHAR (50)    NULL,
    [BankId]          INT              NULL,
    [Bank]            NVARCHAR (50)    NULL,
    [SWId]            INT              NULL,
    [SWName]          NVARCHAR (50)    NULL,
    [shjbh]           VARCHAR (50)     CONSTRAINT [DF_Order_PaymentRecord_shjbh] DEFAULT ('') NULL,
    [FinanceFlag]     BIT              CONSTRAINT [DF_Order_PaymentRecord_FinanceFlag] DEFAULT ((0)) NULL,
    [FinanceDate]     DATETIME         NULL,
    [CompanyId]       INT              NULL,
    [Description]     NVARCHAR (200)   NULL,
    CONSTRAINT [PK_Order_PaymentRecord] PRIMARY KEY CLUSTERED ([Id] ASC)
);


GO
CREATE NONCLUSTERED INDEX [IX_Order_PaymentRecord_OId]
    ON [dbo].[Order_PaymentRecord]([OId] ASC);


GO
CREATE NONCLUSTERED INDEX [IX_Order_PaymentRecord_SalesmanAccount]
    ON [dbo].[Order_PaymentRecord]([SalesmanAccount] ASC);


GO
CREATE NONCLUSTERED INDEX [IX_Order_PaymentRecord_CreateDate]
    ON [dbo].[Order_PaymentRecord]([CreateDate] ASC);


GO
CREATE NONCLUSTERED INDEX [IX_Order_PaymentRecord_CusId]
    ON [dbo].[Order_PaymentRecord]([CusId] ASC);

